package com.woniuxy.consumer.listener.direct;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
//监听器注解
@RabbitListener(queues = "direct-queue1")
@Slf4j
public class DirectQueueListener {
    @RabbitHandler
    public void handleMsg(String msg){
        log.info("DirectQueueListener 消费者监听消息：{}",msg);
    }
}
